<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Kyoto Cabinet: kyotocabinet::DB Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Kyoto Cabinet
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacekyotocabinet.html">kyotocabinet</a>      </li>
      <li class="navelem"><a class="el" href="classkyotocabinet_1_1DB.html">DB</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">kyotocabinet::DB Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="kyotocabinet::DB" -->
<p>Interface of database abstraction.  
 <a href="classkyotocabinet_1_1DB.html#details">More...</a></p>

<p><code>#include &lt;kcdb.h&gt;</code></p>

<p><a href="classkyotocabinet_1_1DB-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html">Cursor</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Interface of cursor to indicate a record.  <a href="classkyotocabinet_1_1DB_1_1Cursor.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB_1_1Visitor.html">Visitor</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Interface to access a record.  <a href="classkyotocabinet_1_1DB_1_1Visitor.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#ae0a7edd6583da1d55195168c0d93acb3">~DB</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#ae0a7edd6583da1d55195168c0d93acb3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#a5ae32216900a642c5182e7ee67677467">accept</a> (const char *kbuf, size_t ksiz, <a class="el" href="classkyotocabinet_1_1DB_1_1Visitor.html">Visitor</a> *visitor, bool writable=true)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Accept a visitor to a record.  <a href="#a5ae32216900a642c5182e7ee67677467"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#a404f686394fed04af54989925c86b555">set</a> (const char *kbuf, size_t ksiz, const char *vbuf, size_t vsiz)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the value of a record.  <a href="#a404f686394fed04af54989925c86b555"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#a35010cb7b5d738a512a50cd55bed36d4">set</a> (const std::string &amp;key, const std::string &amp;value)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the value of a record.  <a href="#a35010cb7b5d738a512a50cd55bed36d4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#adc4dd6b46fe5da9f18b3b138dacea71f">add</a> (const char *kbuf, size_t ksiz, const char *vbuf, size_t vsiz)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a record.  <a href="#adc4dd6b46fe5da9f18b3b138dacea71f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#ade9b857eaef82ff116cc4e02438a956a">add</a> (const std::string &amp;key, const std::string &amp;value)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the value of a record.  <a href="#ade9b857eaef82ff116cc4e02438a956a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#abdffd77bbb95acf3ce805fd8dc9f7bb1">replace</a> (const char *kbuf, size_t ksiz, const char *vbuf, size_t vsiz)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Replace the value of a record.  <a href="#abdffd77bbb95acf3ce805fd8dc9f7bb1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#a8697b0fddb0eda0e5e46a3927384ed3a">replace</a> (const std::string &amp;key, const std::string &amp;value)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Replace the value of a record.  <a href="#a8697b0fddb0eda0e5e46a3927384ed3a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#abd7a961826d20e91fa43a5867534a6a8">append</a> (const char *kbuf, size_t ksiz, const char *vbuf, size_t vsiz)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Append the value of a record.  <a href="#abd7a961826d20e91fa43a5867534a6a8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#ac073545b8c7f98a6d26621c097edf626">append</a> (const std::string &amp;key, const std::string &amp;value)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the value of a record.  <a href="#ac073545b8c7f98a6d26621c097edf626"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#ab0270d5a77d0fab5f10191e4a6c08382">increment</a> (const char *kbuf, size_t ksiz, int64_t num, int64_t orig=0)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a number to the numeric integer value of a record.  <a href="#ab0270d5a77d0fab5f10191e4a6c08382"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#a92708b042898217d517e92a73fc4e20b">increment</a> (const std::string &amp;key, int64_t num, int64_t orig=0)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a number to the numeric integer value of a record.  <a href="#a92708b042898217d517e92a73fc4e20b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#a57e8da17c94575335e91b07955959af3">increment_double</a> (const char *kbuf, size_t ksiz, double num, double orig=0)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a number to the numeric double value of a record.  <a href="#a57e8da17c94575335e91b07955959af3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#ac67203f38620d190893c933e2d17bf70">increment_double</a> (const std::string &amp;key, double num, double orig=0)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a number to the numeric double value of a record.  <a href="#ac67203f38620d190893c933e2d17bf70"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#aabee2bb56d152806855244a7cfa2cbff">cas</a> (const char *kbuf, size_t ksiz, const char *ovbuf, size_t ovsiz, const char *nvbuf, size_t nvsiz)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform compare-and-swap.  <a href="#aabee2bb56d152806855244a7cfa2cbff"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#acaaee7f8996c3ae4ddd35ea79cc3a1e0">cas</a> (const std::string &amp;key, const std::string &amp;ovalue, const std::string &amp;nvalue)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform compare-and-swap.  <a href="#acaaee7f8996c3ae4ddd35ea79cc3a1e0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#ac1aaa8a4954cae19764c0e6d1dba3b72">remove</a> (const char *kbuf, size_t ksiz)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove a record.  <a href="#ac1aaa8a4954cae19764c0e6d1dba3b72"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#a2c86571eb8ded4699c50ae8f0eb44018">remove</a> (const std::string &amp;key)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove a record.  <a href="#a2c86571eb8ded4699c50ae8f0eb44018"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#a11fe066de448a7fb003614c5fe82a46d">get</a> (const char *kbuf, size_t ksiz, size_t *sp)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the value of a record.  <a href="#a11fe066de448a7fb003614c5fe82a46d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#adfba823060898b7a409a2b4017c7ff6b">get</a> (const std::string &amp;key, std::string *value)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the value of a record.  <a href="#adfba823060898b7a409a2b4017c7ff6b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#a6b22f286e891f094da7564f4a212d8f4">get</a> (const char *kbuf, size_t ksiz, char *vbuf, size_t max)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the value of a record.  <a href="#a6b22f286e891f094da7564f4a212d8f4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#a4af24cc337200a78f741fc702fe03e87">check</a> (const char *kbuf, size_t ksiz)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check the existence of a record.  <a href="#a4af24cc337200a78f741fc702fe03e87"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#a4c5878d14e341ae4bdc80a22df244aca">check</a> (const std::string &amp;key)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check the existence of a record.  <a href="#a4c5878d14e341ae4bdc80a22df244aca"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#a858d6b76cd5f0a5425a58bfd7b86f2f5">clear</a> ()=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove all records.  <a href="#a858d6b76cd5f0a5425a58bfd7b86f2f5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#a9ec9e0577dbd25a5cd04dc7509488e8a">count</a> ()=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of records.  <a href="#a9ec9e0577dbd25a5cd04dc7509488e8a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html">Cursor</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1DB.html#a4b3050086c939eed6bd5f0fd32d3d526">cursor</a> ()=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a cursor object.  <a href="#a4b3050086c939eed6bd5f0fd32d3d526"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Interface of database abstraction. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>This class is an abstract class to prescribe the interface of record access. </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ae0a7edd6583da1d55195168c0d93acb3"></a><!-- doxytag: member="kyotocabinet::DB::~DB" ref="ae0a7edd6583da1d55195168c0d93acb3" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classkyotocabinet_1_1DB.html#ae0a7edd6583da1d55195168c0d93acb3">kyotocabinet::DB::~DB</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a5ae32216900a642c5182e7ee67677467"></a><!-- doxytag: member="kyotocabinet::DB::accept" ref="a5ae32216900a642c5182e7ee67677467" args="(const char *kbuf, size_t ksiz, Visitor *visitor, bool writable=true)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classkyotocabinet_1_1DB.html#a5ae32216900a642c5182e7ee67677467">kyotocabinet::DB::accept</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>kbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ksiz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classkyotocabinet_1_1DB_1_1Visitor.html">Visitor</a> *&#160;</td>
          <td class="paramname"><em>visitor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>writable</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Accept a visitor to a record. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">kbuf</td><td>the pointer to the key region. </td></tr>
    <tr><td class="paramname">ksiz</td><td>the size of the key region. </td></tr>
    <tr><td class="paramname">visitor</td><td>a visitor object. </td></tr>
    <tr><td class="paramname">writable</td><td>true for writable operation, or false for read-only operation. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, or false on failure. </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The operation for each record is performed atomically and other threads accessing the same record are blocked. To avoid deadlock, any explicit database operation must not be performed in this function. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1PlantDB.html#a21b949bdd3a0b8fbb9b40ba1f7e3e825">kyotocabinet::PlantDB&lt; BASEDB, DBTYPE &gt;</a>, <a class="el" href="classkyotocabinet_1_1HashDB.html#af5ba4bff5ce1f4ce73c25c57c119a3fd">kyotocabinet::HashDB</a>, <a class="el" href="classkyotocabinet_1_1DirDB.html#a783ee4916eda2fb7c1714032f456478a">kyotocabinet::DirDB</a>, <a class="el" href="classkyotocabinet_1_1CacheDB.html#a0a7926656c87cc321b1695ea40cef121">kyotocabinet::CacheDB</a>, <a class="el" href="classkyotocabinet_1_1ProtoDB.html#addce7abcfed926755ca9f889c5b189f5">kyotocabinet::ProtoDB&lt; STRMAP, DBTYPE &gt;</a>, <a class="el" href="classkyotocabinet_1_1TextDB.html#aa16a3145865a23b5e1812d8977adb5e3">kyotocabinet::TextDB</a>, <a class="el" href="classkyotocabinet_1_1StashDB.html#a173f5b8e362e6f4a48dfc60019d3f5fa">kyotocabinet::StashDB</a>, and <a class="el" href="classkyotocabinet_1_1PolyDB.html#abfadd89cc0469d9abfc180b1f7f06f8d">kyotocabinet::PolyDB</a>.</p>

</div>
</div>
<a class="anchor" id="a404f686394fed04af54989925c86b555"></a><!-- doxytag: member="kyotocabinet::DB::set" ref="a404f686394fed04af54989925c86b555" args="(const char *kbuf, size_t ksiz, const char *vbuf, size_t vsiz)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classkyotocabinet_1_1DB.html#a404f686394fed04af54989925c86b555">kyotocabinet::DB::set</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>kbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ksiz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>vbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>vsiz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the value of a record. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">kbuf</td><td>the pointer to the key region. </td></tr>
    <tr><td class="paramname">ksiz</td><td>the size of the key region. </td></tr>
    <tr><td class="paramname">vbuf</td><td>the pointer to the value region. </td></tr>
    <tr><td class="paramname">vsiz</td><td>the size of the value region. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, or false on failure. </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>If no record corresponds to the key, a new record is created. If the corresponding record exists, the value is overwritten. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#ace1d7f4a0d37c2d4e61b102bc0d0f725">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="a35010cb7b5d738a512a50cd55bed36d4"></a><!-- doxytag: member="kyotocabinet::DB::set" ref="a35010cb7b5d738a512a50cd55bed36d4" args="(const std::string &amp;key, const std::string &amp;value)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classkyotocabinet_1_1DB.html#a404f686394fed04af54989925c86b555">kyotocabinet::DB::set</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the value of a record. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Equal to the original <a class="el" href="classkyotocabinet_1_1DB.html#a404f686394fed04af54989925c86b555" title="Set the value of a record.">DB::set</a> method except that the parameters are std::string. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#aceb9eb24d4664b0dc0f2734da66511c4">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="adc4dd6b46fe5da9f18b3b138dacea71f"></a><!-- doxytag: member="kyotocabinet::DB::add" ref="adc4dd6b46fe5da9f18b3b138dacea71f" args="(const char *kbuf, size_t ksiz, const char *vbuf, size_t vsiz)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classkyotocabinet_1_1DB.html#adc4dd6b46fe5da9f18b3b138dacea71f">kyotocabinet::DB::add</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>kbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ksiz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>vbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>vsiz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a record. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">kbuf</td><td>the pointer to the key region. </td></tr>
    <tr><td class="paramname">ksiz</td><td>the size of the key region. </td></tr>
    <tr><td class="paramname">vbuf</td><td>the pointer to the value region. </td></tr>
    <tr><td class="paramname">vsiz</td><td>the size of the value region. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, or false on failure. </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>If no record corresponds to the key, a new record is created. If the corresponding record exists, the record is not modified and false is returned. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#a330568e1a92d74bfbc38682cd8604462">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="ade9b857eaef82ff116cc4e02438a956a"></a><!-- doxytag: member="kyotocabinet::DB::add" ref="ade9b857eaef82ff116cc4e02438a956a" args="(const std::string &amp;key, const std::string &amp;value)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classkyotocabinet_1_1DB.html#adc4dd6b46fe5da9f18b3b138dacea71f">kyotocabinet::DB::add</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the value of a record. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Equal to the original <a class="el" href="classkyotocabinet_1_1DB.html#adc4dd6b46fe5da9f18b3b138dacea71f" title="Add a record.">DB::add</a> method except that the parameters are std::string. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#ae917d6aa4cba62bd808121fddb4035b0">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="abdffd77bbb95acf3ce805fd8dc9f7bb1"></a><!-- doxytag: member="kyotocabinet::DB::replace" ref="abdffd77bbb95acf3ce805fd8dc9f7bb1" args="(const char *kbuf, size_t ksiz, const char *vbuf, size_t vsiz)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classkyotocabinet_1_1DB.html#abdffd77bbb95acf3ce805fd8dc9f7bb1">kyotocabinet::DB::replace</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>kbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ksiz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>vbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>vsiz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Replace the value of a record. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">kbuf</td><td>the pointer to the key region. </td></tr>
    <tr><td class="paramname">ksiz</td><td>the size of the key region. </td></tr>
    <tr><td class="paramname">vbuf</td><td>the pointer to the value region. </td></tr>
    <tr><td class="paramname">vsiz</td><td>the size of the value region. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, or false on failure. </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>If no record corresponds to the key, no new record is created and false is returned. If the corresponding record exists, the value is modified. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#ac1b65f395e4be9e9ef14973f564e3a48">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="a8697b0fddb0eda0e5e46a3927384ed3a"></a><!-- doxytag: member="kyotocabinet::DB::replace" ref="a8697b0fddb0eda0e5e46a3927384ed3a" args="(const std::string &amp;key, const std::string &amp;value)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classkyotocabinet_1_1DB.html#abdffd77bbb95acf3ce805fd8dc9f7bb1">kyotocabinet::DB::replace</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Replace the value of a record. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Equal to the original <a class="el" href="classkyotocabinet_1_1DB.html#abdffd77bbb95acf3ce805fd8dc9f7bb1" title="Replace the value of a record.">DB::replace</a> method except that the parameters are std::string. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#a42fce9d48b8a3744b05fc61636fab2b1">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="abd7a961826d20e91fa43a5867534a6a8"></a><!-- doxytag: member="kyotocabinet::DB::append" ref="abd7a961826d20e91fa43a5867534a6a8" args="(const char *kbuf, size_t ksiz, const char *vbuf, size_t vsiz)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classkyotocabinet_1_1DB.html#abd7a961826d20e91fa43a5867534a6a8">kyotocabinet::DB::append</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>kbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ksiz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>vbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>vsiz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Append the value of a record. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">kbuf</td><td>the pointer to the key region. </td></tr>
    <tr><td class="paramname">ksiz</td><td>the size of the key region. </td></tr>
    <tr><td class="paramname">vbuf</td><td>the pointer to the value region. </td></tr>
    <tr><td class="paramname">vsiz</td><td>the size of the value region. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, or false on failure. </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>If no record corresponds to the key, a new record is created. If the corresponding record exists, the given value is appended at the end of the existing value. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#a23e776e5bd1e3c5caa0f62edffb87a54">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="ac073545b8c7f98a6d26621c097edf626"></a><!-- doxytag: member="kyotocabinet::DB::append" ref="ac073545b8c7f98a6d26621c097edf626" args="(const std::string &amp;key, const std::string &amp;value)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classkyotocabinet_1_1DB.html#abd7a961826d20e91fa43a5867534a6a8">kyotocabinet::DB::append</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the value of a record. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Equal to the original <a class="el" href="classkyotocabinet_1_1DB.html#abd7a961826d20e91fa43a5867534a6a8" title="Append the value of a record.">DB::append</a> method except that the parameters are std::string. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#aed0ebc961e906fe7fb534f917b4a9f8f">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="ab0270d5a77d0fab5f10191e4a6c08382"></a><!-- doxytag: member="kyotocabinet::DB::increment" ref="ab0270d5a77d0fab5f10191e4a6c08382" args="(const char *kbuf, size_t ksiz, int64_t num, int64_t orig=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int64_t <a class="el" href="classkyotocabinet_1_1DB.html#ab0270d5a77d0fab5f10191e4a6c08382">kyotocabinet::DB::increment</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>kbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ksiz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t&#160;</td>
          <td class="paramname"><em>num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t&#160;</td>
          <td class="paramname"><em>orig</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a number to the numeric integer value of a record. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">kbuf</td><td>the pointer to the key region. </td></tr>
    <tr><td class="paramname">ksiz</td><td>the size of the key region. </td></tr>
    <tr><td class="paramname">num</td><td>the additional number. </td></tr>
    <tr><td class="paramname">orig</td><td>the origin number if no record corresponds to the key. If it is INT64MIN and no record corresponds, this function fails. If it is INT64MAX, the value is set as the additional number regardless of the current value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the result value, or <a class="el" href="namespacekyotocabinet.html#a4e953371600e624903c0a9c1483a6711" title="The minimum value of int64_t.">kyotocabinet::INT64MIN</a> on failure. </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The value is serialized as an 8-byte binary integer in big-endian order, not a decimal string. If existing value is not 8-byte, this function fails. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#a8f8d475dcb1cfb0210a7a40c1367b286">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="a92708b042898217d517e92a73fc4e20b"></a><!-- doxytag: member="kyotocabinet::DB::increment" ref="a92708b042898217d517e92a73fc4e20b" args="(const std::string &amp;key, int64_t num, int64_t orig=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int64_t <a class="el" href="classkyotocabinet_1_1DB.html#ab0270d5a77d0fab5f10191e4a6c08382">kyotocabinet::DB::increment</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t&#160;</td>
          <td class="paramname"><em>num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t&#160;</td>
          <td class="paramname"><em>orig</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a number to the numeric integer value of a record. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Equal to the original <a class="el" href="classkyotocabinet_1_1DB.html#ab0270d5a77d0fab5f10191e4a6c08382" title="Add a number to the numeric integer value of a record.">DB::increment</a> method except that the parameter is std::string. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#a290283ef8e4c021c285b08bab9c0fe78">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="a57e8da17c94575335e91b07955959af3"></a><!-- doxytag: member="kyotocabinet::DB::increment_double" ref="a57e8da17c94575335e91b07955959af3" args="(const char *kbuf, size_t ksiz, double num, double orig=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual double <a class="el" href="classkyotocabinet_1_1DB.html#a57e8da17c94575335e91b07955959af3">kyotocabinet::DB::increment_double</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>kbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ksiz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>orig</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a number to the numeric double value of a record. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">kbuf</td><td>the pointer to the key region. </td></tr>
    <tr><td class="paramname">ksiz</td><td>the size of the key region. </td></tr>
    <tr><td class="paramname">num</td><td>the additional number. </td></tr>
    <tr><td class="paramname">orig</td><td>the origin number if no record corresponds to the key. If it is negative infinity and no record corresponds, this function fails. If it is positive infinity, the value is set as the additional number regardless of the current value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the result value, or Not-a-number on failure. </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The value is serialized as an 16-byte binary fixed-point number in big-endian order, not a decimal string. If existing value is not 16-byte, this function fails. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#a9ba95893fc9ddfdedc515157101371c2">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="ac67203f38620d190893c933e2d17bf70"></a><!-- doxytag: member="kyotocabinet::DB::increment_double" ref="ac67203f38620d190893c933e2d17bf70" args="(const std::string &amp;key, double num, double orig=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual double <a class="el" href="classkyotocabinet_1_1DB.html#a57e8da17c94575335e91b07955959af3">kyotocabinet::DB::increment_double</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>orig</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a number to the numeric double value of a record. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Equal to the original <a class="el" href="classkyotocabinet_1_1DB.html#a57e8da17c94575335e91b07955959af3" title="Add a number to the numeric double value of a record.">DB::increment_double</a> method except that the parameter is std::string. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#a7e37a41ef1611c5712d31cfd4450552c">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="aabee2bb56d152806855244a7cfa2cbff"></a><!-- doxytag: member="kyotocabinet::DB::cas" ref="aabee2bb56d152806855244a7cfa2cbff" args="(const char *kbuf, size_t ksiz, const char *ovbuf, size_t ovsiz, const char *nvbuf, size_t nvsiz)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classkyotocabinet_1_1DB.html#aabee2bb56d152806855244a7cfa2cbff">kyotocabinet::DB::cas</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>kbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ksiz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>ovbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ovsiz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>nvbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>nvsiz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Perform compare-and-swap. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">kbuf</td><td>the pointer to the key region. </td></tr>
    <tr><td class="paramname">ksiz</td><td>the size of the key region. </td></tr>
    <tr><td class="paramname">ovbuf</td><td>the pointer to the old value region. NULL means that no record corresponds. </td></tr>
    <tr><td class="paramname">ovsiz</td><td>the size of the old value region. </td></tr>
    <tr><td class="paramname">nvbuf</td><td>the pointer to the new value region. NULL means that the record is removed. </td></tr>
    <tr><td class="paramname">nvsiz</td><td>the size of new old value region. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, or false on failure. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#a4cc551a65eed27a7905c50aac95f43db">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="acaaee7f8996c3ae4ddd35ea79cc3a1e0"></a><!-- doxytag: member="kyotocabinet::DB::cas" ref="acaaee7f8996c3ae4ddd35ea79cc3a1e0" args="(const std::string &amp;key, const std::string &amp;ovalue, const std::string &amp;nvalue)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classkyotocabinet_1_1DB.html#aabee2bb56d152806855244a7cfa2cbff">kyotocabinet::DB::cas</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>ovalue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>nvalue</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Perform compare-and-swap. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Equal to the original <a class="el" href="classkyotocabinet_1_1DB.html#aabee2bb56d152806855244a7cfa2cbff" title="Perform compare-and-swap.">DB::cas</a> method except that the parameters are std::string. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#a98f785851e346ce32049d70cdac36f51">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="ac1aaa8a4954cae19764c0e6d1dba3b72"></a><!-- doxytag: member="kyotocabinet::DB::remove" ref="ac1aaa8a4954cae19764c0e6d1dba3b72" args="(const char *kbuf, size_t ksiz)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classkyotocabinet_1_1DB.html#ac1aaa8a4954cae19764c0e6d1dba3b72">kyotocabinet::DB::remove</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>kbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ksiz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Remove a record. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">kbuf</td><td>the pointer to the key region. </td></tr>
    <tr><td class="paramname">ksiz</td><td>the size of the key region. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, or false on failure. </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>If no record corresponds to the key, false is returned. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#a98b9a0b2337e16b79a22a97d4d96d04c">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="a2c86571eb8ded4699c50ae8f0eb44018"></a><!-- doxytag: member="kyotocabinet::DB::remove" ref="a2c86571eb8ded4699c50ae8f0eb44018" args="(const std::string &amp;key)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classkyotocabinet_1_1DB.html#ac1aaa8a4954cae19764c0e6d1dba3b72">kyotocabinet::DB::remove</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Remove a record. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Equal to the original <a class="el" href="classkyotocabinet_1_1DB.html#ac1aaa8a4954cae19764c0e6d1dba3b72" title="Remove a record.">DB::remove</a> method except that the parameter is std::string. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#ac6b7b1fdab9e9288c8ff918bef8bf0b3">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="a11fe066de448a7fb003614c5fe82a46d"></a><!-- doxytag: member="kyotocabinet::DB::get" ref="a11fe066de448a7fb003614c5fe82a46d" args="(const char *kbuf, size_t ksiz, size_t *sp)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual char* <a class="el" href="classkyotocabinet_1_1DB.html#a11fe066de448a7fb003614c5fe82a46d">kyotocabinet::DB::get</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>kbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ksiz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>sp</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieve the value of a record. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">kbuf</td><td>the pointer to the key region. </td></tr>
    <tr><td class="paramname">ksiz</td><td>the size of the key region. </td></tr>
    <tr><td class="paramname">sp</td><td>the pointer to the variable into which the size of the region of the return value is assigned. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the pointer to the value region of the corresponding record, or NULL on failure. </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>If no record corresponds to the key, NULL is returned. Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a C-style string. Because the region of the return value is allocated with the the new[] operator, it should be released with the delete[] operator when it is no longer in use. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#a04721eb5a61876244bbc5c08e0a34c61">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="adfba823060898b7a409a2b4017c7ff6b"></a><!-- doxytag: member="kyotocabinet::DB::get" ref="adfba823060898b7a409a2b4017c7ff6b" args="(const std::string &amp;key, std::string *value)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classkyotocabinet_1_1DB.html#a11fe066de448a7fb003614c5fe82a46d">kyotocabinet::DB::get</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string *&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieve the value of a record. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Equal to the original <a class="el" href="classkyotocabinet_1_1DB.html#a11fe066de448a7fb003614c5fe82a46d" title="Retrieve the value of a record.">DB::get</a> method except that the first parameters is the key string and the second parameter is a string to contain the result and the return value is bool for success. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#ad997b0824b30d20fefcfb7e4f8fbd96c">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="a6b22f286e891f094da7564f4a212d8f4"></a><!-- doxytag: member="kyotocabinet::DB::get" ref="a6b22f286e891f094da7564f4a212d8f4" args="(const char *kbuf, size_t ksiz, char *vbuf, size_t max)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t <a class="el" href="classkyotocabinet_1_1DB.html#a11fe066de448a7fb003614c5fe82a46d">kyotocabinet::DB::get</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>kbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ksiz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>vbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>max</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieve the value of a record. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">kbuf</td><td>the pointer to the key region. </td></tr>
    <tr><td class="paramname">ksiz</td><td>the size of the key region. </td></tr>
    <tr><td class="paramname">vbuf</td><td>the pointer to the buffer into which the value of the corresponding record is written. </td></tr>
    <tr><td class="paramname">max</td><td>the size of the buffer. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the size of the value, or -1 on failure. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#abad0525bdccdcab5b587846a69ff0fe3">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="a4af24cc337200a78f741fc702fe03e87"></a><!-- doxytag: member="kyotocabinet::DB::check" ref="a4af24cc337200a78f741fc702fe03e87" args="(const char *kbuf, size_t ksiz)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t <a class="el" href="classkyotocabinet_1_1DB.html#a4af24cc337200a78f741fc702fe03e87">kyotocabinet::DB::check</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>kbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ksiz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check the existence of a record. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">kbuf</td><td>the pointer to the key region. </td></tr>
    <tr><td class="paramname">ksiz</td><td>the size of the key region. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the size of the value, or -1 on failure. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#af884c82d9281ec9631d4ebcc32e4f5cd">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="a4c5878d14e341ae4bdc80a22df244aca"></a><!-- doxytag: member="kyotocabinet::DB::check" ref="a4c5878d14e341ae4bdc80a22df244aca" args="(const std::string &amp;key)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t <a class="el" href="classkyotocabinet_1_1DB.html#a4af24cc337200a78f741fc702fe03e87">kyotocabinet::DB::check</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check the existence of a record. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Equal to the original <a class="el" href="classkyotocabinet_1_1DB.html#a4af24cc337200a78f741fc702fe03e87" title="Check the existence of a record.">DB::check</a> method except that the parameter is std::string. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#a493f9a3b16aa84dd13c4bb842e709471">kyotocabinet::BasicDB</a>.</p>

</div>
</div>
<a class="anchor" id="a858d6b76cd5f0a5425a58bfd7b86f2f5"></a><!-- doxytag: member="kyotocabinet::DB::clear" ref="a858d6b76cd5f0a5425a58bfd7b86f2f5" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classkyotocabinet_1_1DB.html#a858d6b76cd5f0a5425a58bfd7b86f2f5">kyotocabinet::DB::clear</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Remove all records. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, or false on failure. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1PlantDB.html#a61809e5bd2610e1a06698aeb68817d64">kyotocabinet::PlantDB&lt; BASEDB, DBTYPE &gt;</a>, <a class="el" href="classkyotocabinet_1_1HashDB.html#ad57fa07626f7316e8f85b30761fe4111">kyotocabinet::HashDB</a>, <a class="el" href="classkyotocabinet_1_1PolyDB.html#ac44e7a789e618f49c22aa568550e8458">kyotocabinet::PolyDB</a>, <a class="el" href="classkyotocabinet_1_1DirDB.html#ac83c0ac01b8306d08ce3d8390f918ec8">kyotocabinet::DirDB</a>, <a class="el" href="classkyotocabinet_1_1ProtoDB.html#ad80683dcfde15c43dff973d680889387">kyotocabinet::ProtoDB&lt; STRMAP, DBTYPE &gt;</a>, <a class="el" href="classkyotocabinet_1_1CacheDB.html#a426df2e9b1878df1fbe8b102ac0a9ded">kyotocabinet::CacheDB</a>, <a class="el" href="classkyotocabinet_1_1StashDB.html#a629804303626a40287cd36e2f6d21fdd">kyotocabinet::StashDB</a>, and <a class="el" href="classkyotocabinet_1_1TextDB.html#a8224f34989079482977739ed22f74760">kyotocabinet::TextDB</a>.</p>

</div>
</div>
<a class="anchor" id="a9ec9e0577dbd25a5cd04dc7509488e8a"></a><!-- doxytag: member="kyotocabinet::DB::count" ref="a9ec9e0577dbd25a5cd04dc7509488e8a" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int64_t <a class="el" href="classkyotocabinet_1_1DB.html#a9ec9e0577dbd25a5cd04dc7509488e8a">kyotocabinet::DB::count</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the number of records. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of records, or -1 on failure. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1PlantDB.html#a31f43901e55fe473abdfbd0251c259a0">kyotocabinet::PlantDB&lt; BASEDB, DBTYPE &gt;</a>, <a class="el" href="classkyotocabinet_1_1HashDB.html#a4ddabaf565304f34bd3ac8c48473219a">kyotocabinet::HashDB</a>, <a class="el" href="classkyotocabinet_1_1PolyDB.html#a6c3da5678761393ae7eb34273317d73c">kyotocabinet::PolyDB</a>, <a class="el" href="classkyotocabinet_1_1DirDB.html#a2cf204fb743fb423c909ae4da791a190">kyotocabinet::DirDB</a>, <a class="el" href="classkyotocabinet_1_1ProtoDB.html#acc978744b73b3d72c725780b2131f322">kyotocabinet::ProtoDB&lt; STRMAP, DBTYPE &gt;</a>, <a class="el" href="classkyotocabinet_1_1CacheDB.html#a41aff5a403500857452361fbfae78a56">kyotocabinet::CacheDB</a>, <a class="el" href="classkyotocabinet_1_1StashDB.html#aa5e271dda6f621575fee02e7fd6d775e">kyotocabinet::StashDB</a>, and <a class="el" href="classkyotocabinet_1_1TextDB.html#ad9bff6493d82eecb72ee01dbbbbdb6bc">kyotocabinet::TextDB</a>.</p>

</div>
</div>
<a class="anchor" id="a4b3050086c939eed6bd5f0fd32d3d526"></a><!-- doxytag: member="kyotocabinet::DB::cursor" ref="a4b3050086c939eed6bd5f0fd32d3d526" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html">Cursor</a>* <a class="el" href="classkyotocabinet_1_1DB.html#a4b3050086c939eed6bd5f0fd32d3d526">kyotocabinet::DB::cursor</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a cursor object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the return value is the created cursor object. </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Because the object of the return value is allocated by the constructor, it should be released with the delete operator when it is no longer in use. </dd></dl>

<p>Implemented in <a class="el" href="classkyotocabinet_1_1BasicDB.html#af270fcad9cfa1dce1b661c33c07165d6">kyotocabinet::BasicDB</a>, <a class="el" href="classkyotocabinet_1_1PlantDB.html#a93f1873138591d62a508c0cfef53d7ba">kyotocabinet::PlantDB&lt; BASEDB, DBTYPE &gt;</a>, <a class="el" href="classkyotocabinet_1_1PolyDB.html#a54f983af2afab8f667d1e28595b224c2">kyotocabinet::PolyDB</a>, <a class="el" href="classkyotocabinet_1_1HashDB.html#af0924e24d436a6c4f827a2c0c6260f4d">kyotocabinet::HashDB</a>, <a class="el" href="classkyotocabinet_1_1DirDB.html#a022cc78478731810c4defb3e2e055b7b">kyotocabinet::DirDB</a>, <a class="el" href="classkyotocabinet_1_1ProtoDB.html#a8222c60d8d58fa1a45941507dc9deba1">kyotocabinet::ProtoDB&lt; STRMAP, DBTYPE &gt;</a>, <a class="el" href="classkyotocabinet_1_1CacheDB.html#a17e1259ddba5fc7d45185f715394c99b">kyotocabinet::CacheDB</a>, <a class="el" href="classkyotocabinet_1_1StashDB.html#a277edca8ea85b329a13348f9784cea2e">kyotocabinet::StashDB</a>, and <a class="el" href="classkyotocabinet_1_1TextDB.html#a8d3240913a7a8ffbeebe0392318c5562">kyotocabinet::TextDB</a>.</p>

</div>
</div>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
